const fs = require('fs');
fs.readFile('./src/assets/font/selection.json', 'utf8', function(err, data) {
  if (err) console.log(err);
  const { icons } = JSON.parse(data); //读取的值
  const res = icons.map(item => ({
    [item.icon.tags[0]]: item.properties.code
  }));

  const resObject = Object.assign(...res);

  console.log(resObject);
});
